package com.neuedu.ylbx.controller;

import com.neuedu.ylbx.pojo.PatientRegistration;
import com.neuedu.ylbx.service.HospitalReimbursementService;
import com.neuedu.ylbx.service.PatientRegistrationService;
import com.neuedu.ylbx.utils.ResultVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @version V1.0
 * @author: xianzhen
 * @date: 2025/7/9
 */

@RestController
@RequestMapping("/patientRegistration")
@Tag(name = "患者入院登记管理")
@CrossOrigin
public class PatientRegistrationController {
    @Autowired
    PatientRegistrationService patientRegistrationService;

    @PostMapping("/register")
    @Operation(summary = "患者入院登记")
    public ResultVo register(PatientRegistration patientRegistration){
        return patientRegistrationService.register(patientRegistration);
    }

    @GetMapping("/patients")
    @Operation(summary = "获取患者列表")
    public ResultVo getPatients(){
        return patientRegistrationService.getPatients();
    }

    @GetMapping("/patientdetails")
    @Operation(summary = "获取患者详情")
    public ResultVo getPatientDetails(String patientId){
        return patientRegistrationService.getPatientDetails(patientId);
    }
}
